#include "mainwindow.h"
#include "./ui_mainwindow.h"
#include "QPainter"
#include "QDebug"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{

    ui->setupUi(this);

    ui->menubar->setNativeMenuBar(false);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::paintEvent(QPaintEvent *event) {
    QPainter painter(this);

    painter.drawRect(0,0, 100, 100);
}

void MainWindow::mousePressEvent(QMouseEvent *event) {
    qDebug() << "我的按钮类构造调用";
}

